author: Ania Majewska and Reni Kaul date: May 22, 2019 autosize: true font-import: https://fonts.googleapis.com/css?family=PT+Sans font-family: ‘PT Sans’, sans-serif;
Ania Majewska - My research interest is in conservation biology and disease ecology - I use R in my research to: + organize and wrangle data + analyze data (statistical models) + model disease dynamics (transmission) - I mostly work on the monarch butterfly and it’s protozoan parasite - My contact info is majewska@uga.edu
Reni Kaul - My research interest is [INSERT DESCRIPTION] - I use R in my research to: + organize data + develop machine learning algorithms + [INSERT DETAILS] - I mostly work [in this disease system or approach] - My contact info is [INSERT EMAIL]
left:65% The workshop series consists of four half day workshops each focusing on a different part of the research process - Introduction to R (Today: Ania Majewska and Reni Kaul) - Reproducible research (May 29; Deven Vishwas Gokhale and Reni Kaul ) - Simulating infectious diseases (June 3; John Vinson) - Visualizing data (June 7; Robbie Richards)
workflow
Rleft:60% You - Come ready to participate + do the reading + review the materials beforehand - Ask questions - Help each other
Instructors - Come prepared - Help you find answers - Be a resource for you during the REU program
left: 40%
At the end of this workshop you should be able to… - calculate summary statistics of a dataset - create a figure from data
Topics 1. What is R and RStudio? 2. Introduction to R and tidyverse
Break 3. Code along / Exercise
Break 4. Troubleshooting
5. Exploring data in groups
Break 6. Wrap Up 7. Datacamp.com
left: 50%
R)R packages which are collections of functions and data sets developed by the community.R programming easier:Let’s open Rstudio!
RStudio
left: 50%
%>%) to connect data (object) to verbs (functions).tidy syntax
The tidyverse package is designed to make it easy to install and load core packages from the tidyverse in a single command.
tidy verse package
tidyverse package. This can be done by clicking on buttons in Rstudio or from the console using install.packages()# install all the packages in the tidyverse
install.packages("tidyverse")
library().# load tidyverse library
library(tidyverse)
========================================================
Unzip and open the folder.
Open W1_Exercise.Rproj
========================================================
Break
Resume in 15 min========================================================
left: 35% - Every function has a help page - ?function() to access
manual page
left: 50% * Packages have a vignette and/or reference manual on cran.r-project.org
left: 30%
cheatsheets
left: 30%
cheatsheets
error
First, try to understand the error message. It can be very helpful.
left: 30%
Let’s work in small groups (max of 3)
W1_Exercise.Rmd fileMore instructions in the file.
left: 50%
We can… - calculate summary statistics of a dataset - create a figure from data
using - dplyr package - filter, arrange… - ggplot2 package - geom_point, facet…
W1
left: 50%
Next week
Focus on communication by following best practices for reproducible research
W1
We will be using datacamp.com to build more skills!